<div class='row'>
    <div class='col-sm-12'>
        <div class='box' style='margin-top: 20px;'>
            <div class='box-header blue-background'>
                <div class='title'>批量添加面料内容</div>
            </div>
            <div class='box-content'>
                <form class='form form-horizontal validate-form'  action='//jquery-file-upload.appspot.com/' enctype='multipart/form-data' id='fileupload' method='POST'>
                    {:token()}
                    <input type="hidden" name="release_season" value="0"/>
                    <div class='row' style='width:90%;margin-left:10px;'>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_price'>统一价格:</label>
                            <div class='col-md-7 controls controls'>
                                <input id='validation_price' class='form-control' name='price' data-rule-required='true' placeholder='统一售价' type='text' />
                            </div>
                        </div>
<!--                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_jinjia'>统一进价:</label>
                            <div class='col-md-7 controls controls'>
                                <input id='validation_jinjia' class='form-control'   name='jinjia' placeholder='统一进价' type='text' />
                            </div>
                        </div>                                   -->
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>面料工艺:</label>
                            <div class='col-md-7 controls'>
                                {volist id="tech" name="techs"}
                                <div class='checkbox fa-pull-left'>
                                    <label> 
                                        <input type="checkbox" name="tech[]" value="{$tech.id}" data-rule-required='true'/>{$tech.name}&nbsp; &nbsp;
                                    </label>
                                </div>
                                {/volist}
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>面料颜色:</label>
                            <div class='col-md-7 controls'>
                                {volist id="color" name="colors"}
                                <div class='checkbox fa-pull-left'>
                                    <label> 
                                        <input type="checkbox" name="color[]"  value="{$color.id}" data-rule-required='true'/>{$color.name} &nbsp; &nbsp;
                                    </label>
                                </div>
                                {/volist}
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>图案类型:</label>
                            <div class='col-md-7 controls'>
                                {volist id="p" name="patterns"}
                                <div class='checkbox fa-pull-left'>
                                    <label> 
                                        <input type="checkbox" name="pattern[]" value="{$p.id}" data-rule-required='true'/>{$p.name} &nbsp; &nbsp;
                                    </label>
                                </div>
                                {/volist}
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>适用类型:</label>
                            <div class='col-md-7 controls'>
                                {volist id="pp" name="purposes"}
                                <div class='checkbox fa-pull-left'>
                                    <label> 
                                        <input type="checkbox" name="purpose[]" value="{$pp.id}" data-rule-required='true'/>{$pp.name} &nbsp; &nbsp;
                                    </label>
                                </div>
                                {/volist}
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>特殊处理:</label>
                            <div class='col-md-7 controls'>
                                {volist id="deal" name="deals"}
                                <div class='checkbox fa-pull-left'>
                                    <label> 
                                        <input type="checkbox" name="deal[]"  value="{$deal.id}" data-rule-required='true'/> {$deal.name}&nbsp; &nbsp;
                                    </label>
                                </div>
                                {/volist}
                            </div>
                        </div>                                    
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label'>面料类型:</label>
                            <div class='col-md-7 controls'>
                                <select class='form-control'  name="type_id">
                                    {volist id="zx" name="types"}<option value="{$zx.id}">{$zx.name}</option>{/volist}
                                </select>
                            </div>
                        </div> 
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_zworganization'>织物组织:</label>
                            <div class='col-md-7 controls'>
                                <input class='form-control' type='text' name="zworganization" placeholder='请填写织物组织'
                                       id="validation_zworganization" /> 
                            </div>	
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_weight'>面料克重:</label>
                            <div class='col-md-7 controls'>
                                <input class='form-control' type='text' name="weight" placeholder='请填写克重'
                                       id="validation_weight" /> 
                            </div>	
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_element'>面料成分:</label>
                            <div class='col-md-7 controls'>
                                <input class='form-control' type='text' name="element" placeholder='请填写成分'
                                       id="validation_element" /> 
                            </div>	
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_larghezza'>面料门幅:</label>
                            <div class='col-md-7 controls'>
                                <input class='form-control' type='text' name="larghezza" placeholder='请填写门幅'
                                       id="validation_larghezza" /> 
                            </div>	
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_weavemode'>编织方式:</label>
                            <div class='col-md-7 controls'>
                                <input class='form-control' type='text' name="weavemode" placeholder='请填写编织方式'
                                       id="validation_weavemode" /> 
                            </div>	
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_gender'>适用性别:</label>
                            <div class='col-md-7'>
                                <select class='form-control' id='validation_gender' name="gender" >	
                                    <option value="0" >通用</option>								
                                    <option value="1" >男</option>
                                    <option value="2" >女</option>
                                </select>
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-2 col-lg-2 control-label' for='validation_apply_season'>适用季节:</label>
                            <div class='col-md-7'>
                                <select class='form-control' id='validation_apply_season' name="apply_season" >	
                                    <option value="1" >春/秋</option>								
                                    <option value="2" >夏</option>
                                    <option value="3" >冬</option>
                                    <option value="4"  selected>全年</option>
                                </select>
                            </div>
                        </div> 
                    </div>
                    <div class='row fileupload-buttonbar' style="margin-left:20px;">
                        <div class='col-lg-7 col-sm-offset-1'>
                            <span class='btn btn-success fileinput-button'>
                                <i class='fa fa-plus'></i>
                                <span>选择图片文件...</span>
                                <input multiple='multiple' name='files[]' type='file'>
                            </span>
                            <button class='btn btn-primary start' type='submit'>
                                <i class='fa fa-upload'></i>
                                <span>开始批量上传</span>
                            </button>
                            <button class='btn btn-warning cancel' type='reset'>
                                <i class='fa fa-ban'></i>
                                <span>取消上传</span>
                            </button>
                            <span class='fileupload-process'></span>
                        </div>
                        <div class='col-lg-5 fileupload-progress fade'>
                            <div aria-valuemax='100' aria-valuemin='0' class='progress progress-striped active' role='progressbar'>
                                <div class='progress-bar progress-bar-success' style='width:0%;'></div>
                            </div>
                            <div class='progress-extended'> </div>
                        </div>
                    </div>
                    <table class='table table-striped' role='presentation'>
                        <tbody class='files'></tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- The blueimp Gallery widget -->
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
    <div class="slides"></div>
    <h3 class="title"></h3>
    <a class="prev">‹</a>
    <a class="next">›</a>
    <a class="close">×</a>
    <a class="play-pause"></a>
    <ol class="indicator"></ol>
</div>

<literal>
    <script id="template-upload" type="text/x-tmpl">
        {% for (var i=0, file; file=o.files[i]; i++) { %}
        <tr class="template-upload fade">
        <td>
        <span class="preview"></span>
        </td>
        <td>
        <p class="name">{%=file.name%}</p>
        <strong class="error text-danger"></strong>
        </td>
        <td>
        <p class="size">Processing...</p>
        <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
        </td>
        <td>
        {% if (!i && !o.options.autoUpload) { %}
        <button class="btn btn-primary start" disabled>
        <i class="fa fa-upload"></i>
        <span>Start</span>
        </button>
        {% } %}
        {% if (!i) { %}
        <button class="btn btn-warning cancel">
        <i class="fa fa-ban"></i>
        <span>Cancel</span>
        </button>
        {% } %}
        </td>
        </tr>
        {% } %}
    </script>

    <script id="template-download" type="text/x-tmpl">
        {% for (var i=0, file; file=o.files[i]; i++) { %}
        <tr class="template-download fade">
        <td>
        <span class="preview">
        {% if (file.thumbnailUrl) { %}
        <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
        {% } %}
        </span>
        </td>
        <td>
        <p class="name">
        {% if (file.url) { %}
        <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
        {% } else { %}
        <span>{%=file.name%}</span>
        {% } %}
        </p>
        {% if (file.error) { %}
        <div><span class="label label-danger">Error</span> {%=file.error%}</div>
        {% } %}
        </td>
        <td>
        <span class="size">{%=o.formatFileSize(file.size)%}</span>
        </td>
        <td>
        {% if (file.deleteUrl) { %}
        <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
        <i class="fa fa-trash"></i>
        <span>Delete</span>
        </button>
        <input type="checkbox" name="delete" value="1" class="toggle">
        {% } else { %}
        <button class="btn btn-warning cancel">
        <i class="fa fa-ban"></i>
        <span>Cancel</span>
        </button>
        {% } %}
        </td>
        </tr>
        {% } %}
    </script>
</literal>

